home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 109
/
Vol 109.iso
/
games
/
javelin.swf
/
scripts
/
__Packages
/
CJavelin.as
next >
Wrap
Text File
|
2008-11-12
|
1KB
|
70 lines
class CJavelin
{
function CJavelin()
{
}
function CRat()
{
this.angle = 89;
this.now_frm = 0;
this.dx = 0;
this.dy = 0;
this.rot_dr = 0;
this.now_rotat = 0;
this.start_vy = 0;
this.cnt_frm = 0;
this.step_metr = 2;
}
function SetDefault()
{
this.angle = 89;
this.now_frm = 0;
this.dx = 0;
this.dy = 0;
this.rot_dr = 0;
this.now_rotat = 0;
this.start_vy = 0;
this.cnt_frm = 0;
this.next_point = 0;
this.step_metr = 2;
}
function onTimer(st)
{
if(st == 2 || st == 3)
{
if(this.now_frm < 49)
{
this.now_frm = this.now_frm + 1;
}
}
}
function SetAngle()
{
this.angle = 89 - this.now_frm * 1.5;
}
function CalcPos(rx)
{
this.px = rx - this.now_frm;
this.py = 300;
}
function SetDxDy(sdx, sdy)
{
this.dx = sdx;
this.dy = sdy;
}
function SetTimeFly(tm)
{
this.timefly = tm;
this.fulltime = tm;
}
function SetAnglRotation(rt)
{
this.now_rotat = 76 - Math.floor(this.now_frm * 1.5);
this.rot_dr = rt;
}
function FlyRotation()
{
this.now_rotat += this.rot_dr;
}
}